import axios from "../utils/request";
//获取个人信息
export const $getSelfInformation=async(params)=>{
    let {data}=await axios.get('auth/selfInformation',params);
    return data;
}
//查看他人信息
export const $getother=async(params)=>{
    let {data}=await axios.get('auth/getInformation',{params:params});
    return data;
}
//获取个人帖子数据
export const $getMinePosts=async(params)=>{
    let {data}=await axios.get('post/showSelfPosts',{params:params});
    return data;
}

//显示关注人数和关注者人数
export const $getFollowCount=async (params)=>{
    let {data}=await axios.get('follow/showCountFollowAndFan',{params:params});
    return data;
}
//获取用户标签
export const $getTagList=async (params)=>{
    let {data}=await axios.get('tag/showTagForStudent',{params:params});
    return data;
}

//根据搜索框的内容返回用户标签
export const $getSearchTagList=async (params)=>{
    let {data}=await axios.get('tag/searchStudentTag',{params:params});
    return data;
}
//添加用户标签
export const $addnewTag=async(params)=>{
    let {data}=await axios.post('tag/addTagForStudent',params);
    return data;
}
//删除用户标签
export const $deletenewTag=async(params)=>{
    console.log(params);
    let {data}=await axios.delete('tag/deleteTagForStudent', {data:params});
    return data;
}
//修改个人信息
export const $ModifySelfInfo=async(params)=>{
    let {data}=await axios.put('auth/modifySelfInfo',params);
    return data;
}
//上传头像
export const $ModifyAvater=async(params)=>{
    console.log(params);
    let {data}=await axios.post('auth/avatar',params);
    return data;
}